// adminrui wang20220217:152022

using System;
using ProtoBuf;
using Unity.Mathematics;

namespace ET
{

    [ProtoContract]
    [ProtobufBaseTypeRegisterAttribute]
    public abstract class Snapshot
    {
        [ProtoMember(1)]
        public uint Frame;
        [ProtoMember(2)]
        public long UnitId;
        // public abstract Snapshot Init(long unitId);
        // public virtual void Clear()
        // {
        //     Frame = 0;
        //     UnitId = 0;
        // }
    }
    [ProtoContract]
    public class StateChange: Snapshot
    {
        /// <summary>
        /// 血量
        /// </summary>
        [ProtoMember(1)]
        public short HP;
        /// <summary>
        /// 大招量
        /// </summary>
        [ProtoMember(2)]
        public byte SP;
        /// <summary>
        /// 墨水量
        /// </summary>
        [ProtoMember(3)]
        public short Mana;
        /// <summary>
        /// 鱿鱼态
        /// </summary>
        [ProtoMember(4)]
        public bool SquidState;
        /// <summary>
        /// 护甲
        /// </summary>
        [ProtoMember(4)]
        public short Armor;
    }
    [ProtoContract]
    public class Move: Snapshot
    {
        [ProtoMember(1)]
        public float3 velocity;
        [ProtoMember(2)]
        public float3 position;
    }
    [ProtoContract]
    public class Rotate: Snapshot
    {
        [ProtoMember(1)]
        public float3 velocity;
        [ProtoMember(2)]
        public quaternion rotation;
    }
    [ProtoContract]
    public class Shoot: Snapshot
    {
        [ProtoMember(1)]
        public float3 velocity;
        [ProtoMember(2)]
        public quaternion rotation;
    }
    [ProtoContract]
    public class YouYuJump: Snapshot
    {
        [ProtoMember(1)]
        public float3 velocity;
        [ProtoMember(2)]
        public quaternion rotation;
    }
}